package com.hippo.core.ui.components

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.HorizontalDivider
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp

@Composable
fun CommonBody(
    title:String? = null,
    onBack: (() -> Unit),
    modifier: Modifier = Modifier,
    content: @Composable () -> Unit
) {

    Column(modifier = Modifier
        .fillMaxSize().background(
            color = Color.White
        )
    ) {

        TitleBar(
            title = title,
            onBack = onBack
        )

        HorizontalDivider(thickness = 0.5.dp)

        Column(modifier = modifier) {
            content()
        }

    }
}